package com.itheima.dao;

import com.itheima.pojo.Role;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

@Repository
public interface RoleMapper extends Mapper<Role> {

    @Select("SELECT * FROM t_role WHERE `summary` LIKE CONCAT('%',#{keyWord},'%') OR `role_name` LIKE CONCAT('%',#{keyWord},'%')")
    List<Map> findAllByKeyword(String keyword);
}
